﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.Entity;
using COM.OA.BLL;

public partial class gxxz_openfile : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Request.Params["fid"] != null)
        {
            //打开的文件ID
            int id = Int32.Parse(this.Request.Params["fid"].ToString());

            
            //更改打开文件的次数

            files f = filesBLL.Select(id);
            f.f_readdegree += 1;
            filesBLL.Update(f);
            
            this.Response.Write(string.Format(GetRedirect.REDIRECT,"upload/"+f.f_filename));

        }
        else
        {
            return;
        }
    }
}
